#!/bin/bash
# Users can modify the following paths
DATASET_DIR="/backup/data/Audioset/zelin"
WORKSPACE="/backup/data/Audioset/zelin/workspaces/audioset_tagging"

# ============ Train & Inference ============

MODEL_TYPE="Cnn14Bert"
CUDA_VISIBLE_DEVICES=3 python3 pytorch/finetune_bimodal.py train --finetune_task AudioCaps --workspace=$WORKSPACE --train_audio_dir "/backup/data/audiocaps/audio/train/" --train_meta_dir "./audiocaps_data/train_processed.json" --val_audio_dir "/backup/data/audiocaps/audio/val/" --val_meta_dir "./audiocaps_data/val_processed.json" --window_size=1024 --hop_size=160 --mel_bins=64 --fmin=50 --fmax=8000 --model_type=$MODEL_TYPE --bert_model_type="prajjwal1/bert-medium" --loss_type='clip_bce' --balanced='balanced' --batch_size=32 --max_text_nums 128 --learning_rate=2e-4 --resume_checkpoint_path='/backup/data/Audioset/zelin/workspaces/audioset_tagging/checkpoints_bimodal/main_bimodal/sample_rate=32000,window_size=1024,hop_size=160,mel_bins=64,fmin=50,fmax=8000/data_type=balanced_train/Cnn14Bert/bert_type=prajjwal1/bert-medium/balanced=balanced/max_text_nums=128/max_seq_len=16/batch_size=16/50000_iterations.pth' --save_interval 1 --train_epoches=20 --cuda --fp16

# # Plot statistics
# python3 utils/plot_statistics.py plot --dataset_dir=$DATASET_DIR --workspace=$WORKSPACE --select=1_aug
